#pragma once

#include "FxArrayList.h"
#include "FlexibleMemory.h"
#include "GlobalMemoryInstance.h"
#include "XMLInstance.h"
#include "UtilInstance.h"
#include "LogFileWriter.h"

static void* g_ptr_global_singleton = NULL;

class CGlobalInfoInstance
{
public:
	static CGlobalInfoInstance* GetInstance()
	{
		if(g_ptr_global_singleton == NULL)
		{
			g_ptr_global_singleton = new CGlobalInfoInstance();
		}
		return (CGlobalInfoInstance*)g_ptr_global_singleton;
	}

	static void DeleteInstance()
	{
		if(g_ptr_global_singleton != NULL)
			delete (CGlobalInfoInstance*)g_ptr_global_singleton;

		g_ptr_global_singleton = NULL;
	}

public:
	CGlobalInfoInstance(void);
	~CGlobalInfoInstance(void);
public:
	char g_str_mgm_server_name[128];
	char g_str_mgm_server_user[64];
	char g_str_mgm_server_pwd[64];

	CFxArrayList g_ary_supported_ip_camera_types;
	CFxArrayList g_ary_input_devices;

private:
	int g_int_max_stream_id;

public:
	int GetMaxStreamID();

public:
	BOOL g_bln_isClosing;
};
